import request from '@/utils/request'

// 查询用户收益明细列表
export function listEarnings(query) {
  return request({
    url: '/system/earnings/list',
    method: 'get',
    params: query
  })
}

// 查询用户收益明细详细
export function getEarnings(id) {
  return request({
    url: '/system/earnings/' + id,
    method: 'get'
  })
}

// 新增用户收益明细
export function addEarnings(data) {
  return request({
    url: '/system/earnings',
    method: 'post',
    data: data
  })
}

// 修改用户收益明细
export function updateEarnings(data) {
  return request({
    url: '/system/earnings',
    method: 'put',
    data: data
  })
}

// 删除用户收益明细
export function delEarnings(id) {
  return request({
    url: '/system/earnings/' + id,
    method: 'delete'
  })
}
